package gen1us.jutw.CreateConfig;

/*
 Copyright 2009 Evgeny Yusov

 This file is part of JUTW.

 JUTW is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 JUTW is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with JUTW.  If not, see http://www.gnu.org/licenses/.
 */

public class ConfigFrame {
	public static void createConfig() {
		Config config = new Config();
		config.addParam("tuser", "Twitter user");
		config.addParamPass("tpasswd", "Twitter password");
		ComboBox comboBoxJabber = new ComboBox("Jabber service");
		comboBoxJabber.add("other", "jserver", "");
		comboBoxJabber.add("other", "jservice", "");
		comboBoxJabber.add("other", "jid", "");
		comboBoxJabber.add("GTalk", "jserver", "talk.google.com");
		comboBoxJabber.add("GTalk", "jservice", "gmail.com");
		comboBoxJabber.add("GTalk", "jid", "@gmail.com");
		comboBoxJabber.add("Yandex", "jserver", "xmpp.ya.ru");
		comboBoxJabber.add("Yandex", "jservice", "ya.ru");
		comboBoxJabber.add("Yandex", "jid", "");
		comboBoxJabber.add("LJ", "jserver", "www.livejournal.com");
		comboBoxJabber.add("LJ", "jservice", "livejournal.com");
		comboBoxJabber.add("LJ", "jid", "@livejournal.com");
		comboBoxJabber.add("jabber.ru", "jserver", "jabber.ru");
		comboBoxJabber.add("jabber.ru", "jservice", "jabber.ru");
		comboBoxJabber.add("jabber.ru", "jSASLAuthentication", "yes");
		comboBoxJabber.add("jabber.ru", "jSecurityMode", "yes");
		comboBoxJabber.add("jabber.ru", "jPlain", "yes");
		config.addComboBox(comboBoxJabber);
		config.addParam("jserver", "Jabber server");
		config.addParam("jservice", "Service name");
		config.addParam("jid", "Jabber ID");
		config.addParamPass("jpasswd", "Password for JID");
		config.addParam("destjid", "Destination JID");
		config.addParam("interval", "Update interval in seconds", "300");
		config.addCheckBox("nort", "Disable RT (retwitting)");
		config.addCheckBox("ExpandLinks", "Expand short links (from bit.ly)");
		config.addCheckBoxWithoutYes("venable", "Enable Vkontakte reposting");
		config.addParam("vemail", "Vkontakte email", OPTIONAL);
		config.addParam("vid", "Vkontakte ID", OPTIONAL);
		config.addParamPass("vpasswd", "Vkontakte password", OPTIONAL);
		config.addCut(); // advanced cut
		config.addCheckBox("jSASLAuthentication", "jSASLAuthentication");
		config.addCheckBox("jSecurityMode", "jSecurityMode");
		config.addCheckBoxWithoutYes("jPlain", "jPlain");
		JutwFrame window = new JutwFrame(config);
		window.make();
	}
	
	static final int OPTIONAL = Config.OPTIONAL;
}
